<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<p:dialog widgetVar="dialogoCadastrarCostrutoraWidget"
		id="dialogoIdCadastrarConstrutora" height="580" width="430" modal="true"
		closable="true" draggable="false" resizable="false" header="Cadastro da Construtora">
		<h:form id="formCadastrarConstrutora" prependId="false">
			<h:panelGrid columns="2">
			
			<h:outputText value=" Razão Social:" />
			<p:inputText  value="#{construtoraMB.construtora.razaoSocial}" required="true" label="razaoSocial" size="40" >
				<f:validateLength minimum="3" />
			</p:inputText>
			
			<h:outputText value=" Nome Fantasia:" />
			<p:inputText  value="#{construtoraMB.construtora.nomeFantasia}" required="false" label="nomeFantasia" size="40" >
				<f:validateLength minimum="3" />
			</p:inputText>
			
			<h:outputText value=" CNPJ:" />
				<p:inputMask mask="99.999.999/9999-99" value="#{construtoraMB.construtora.cnpj}" size="18" />
				
			<h:outputText value=" Logradouro:" />
				<p:inputText  value="#{construtoraMB.construtora.logradouro}" required="false" label="logradouro" size="40" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
			<h:outputText value=" Número:" />
				<p:inputText  value="#{construtoraMB.construtora.numero}" required="false" label="numero" size="6" >
					<f:validateLength minimum="1" />
				</p:inputText>
				
			<h:outputText value=" Complemento:" />
				<p:inputText  value="#{construtoraMB.construtora.complemento}" required="false" label="complemento" size="25" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
				<h:outputText value=" Bairro:" />
				<p:inputText  value="#{construtoraMB.construtora.bairro}" required="false" label="bairro" size="25" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
			<h:outputText value=" CEP:" />
				<p:inputMask mask="99.999-999" value="#{construtoraMB.construtora.cep}" size="12" />
				
			<h:outputText value=" Cidade:" />
				<p:inputText  value="#{construtoraMB.construtora.cidade}" required="false" label="cidade" size="25" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
			<h:outputText value=" Estado:" />
				<p:inputText  value="#{construtoraMB.construtora.estado}" required="false" label="estado" size="25" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
			<h:outputText value=" Telefone:" />
				<p:inputMask mask="(99)9999-9999" value="#{construtoraMB.construtora.telefone1}" size="12"/>
				
				<h:outputText value=" Telefone:" />
				<p:inputMask mask="(99)9999-9999" value="#{construtoraMB.construtora.telefone2}" size="12"/>
				
			<h:outputText value=" Celular:" />
				<p:inputMask mask="(99)9999-9999" value="#{construtoraMB.construtora.celular1}" size="12"/>
				
			<h:outputText value=" Celular:" />
				<p:inputMask mask="(99)9999-9999" value="#{construtoraMB.construtora.celular2}" size="12"/>
				
			<h:outputText value=" Fax:" />
				<p:inputMask mask="(99)9999-9999" value="#{construtoraMB.construtora.fax}" size="12"/>
				
			<h:outputText value=" Contato:" />
				<p:inputText value="#{construtoraMB.construtora.contato}" required="false" label="contato" size="40" />
					
			<h:outputText value=" Email:" />
				<p:inputText  value="#{construtoraMB.construtora.email}" required="false" label="email" size="40" >
					<f:validateLength minimum="3" />
				</p:inputText>
				
			<h:outputText value=" Site:" />
				<p:inputText  value="#{construtoraMB.construtora.site}" required="false" label="site" size="40" >
					<f:validateLength minimum="3" />
				</p:inputText>

				<p:commandButton value="Cadastrar" icon="ui-icon-plus"
					action="#{construtoraMB.salvarConstrutora()}"
					update=":messageGrowl :formPrincipalConstrutora:construtoraTable"
					oncomplete="closeDialogIfSucess(xhr, status, args, dialogoCadastrarCostrutoraWidget, 'dialogoIdCriaConstrutora')" />
				<p:commandButton value="Cancelar" icon="ui-icon-cancel" actionListener="#{construtoraMB.construtora()}"
					onclick="dialogoCadastrarCostrutoraWidget.hide();" type="button" />
			</h:panelGrid>
		</h:form>
	</p:dialog>
</h:body>
</html>